import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:s_k_todo/model/task_model.dart';

import '../r.g.dart';

class TaskListAdapter extends StatelessWidget {
  final TaskStep step;

  const TaskListAdapter(this.step, {super.key});

  @override
  Widget build(BuildContext context) => Container(
        padding: const EdgeInsets.only(right: 20),
        decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(100),
            color: Theme.of(context).primaryColorDark),
        child: Row(
          mainAxisSize: MainAxisSize.min,
          children: [
            const SizedBox(
              width: 5,
            ),
            Container(
              padding: const EdgeInsets.all(3),
              height: 30,
              width: 30,
              constraints: const BoxConstraints(minHeight: 0, minWidth: 0),
              decoration: BoxDecoration(
                  color: Colors.white, borderRadius: BorderRadius.circular(30)),
              child: AspectRatio(
                aspectRatio: 1,
                child: SvgPicture.asset(
                  R.svg.asset.success.assetName,
                  width: 10,
                  color: Color(0XFF999999),
                ),
              ),
            ),
            const SizedBox(
              width: 10,
            ),
            Text(
              step.stepTitle ?? "",
              style: TextStyle(color: Colors.white),
            )
          ],
        ),
      );
}

class TaskStepSmall extends StatelessWidget {
  const TaskStepSmall({super.key});

  @override
  Widget build(BuildContext context) {
    return const Placeholder();
  }
}
